use agricultural_risk_broader_behaviour_panel.dta, clear

global xp "lgdp_per eduy lfdi "
global xd "lgdp_per"
global xr "latitude longitude area"


//Table 4 & Supplementary Table 4
reg lcooperative AgriculturalRiskCovered $xd $xr i.year, cluster(provinceid) r
reg lcooperative AgriculturalRiskAffected $xd $xr i.year, cluster(provinceid) r
* The data on farmers' cooperatives (lcooperative) supporting Table 4 were obtained from the China Academy for Rural Development-Qiyan China Agri-research Database (CCAD). Although we are not permitted to share the data, it can be requested at: https://r.qiyandata.com/welcome.
reg linvention AgriculturalRiskCovered $xp $xr i.year, cluster(provinceid) r
reg linvention AgriculturalRiskAffected $xp $xr i.year, cluster(provinceid) r
reg divorce1 AgriculturalRiskCovered $xd $xr i.year, cluster(provinceid) r
reg divorce1 AgriculturalRiskAffected $xd $xr i.year, cluster(provinceid) r


//Part three of Supplementary Table 1
sum lcooperative linvention divorce1 lgdp_per eduy lfdi
* The data on farmers' cooperatives (lcooperative) were obtained from the China Academy for Rural Development-Qiyan China Agri-research Database (CCAD). Although we are not permitted to share the data, it can be requested at: https://r.qiyandata.com/welcome.


//Supplementary Table 21
reg ltotal_patent AgriculturalRiskCovered $xp $xr i.year, cluster(provinceid) r
reg ltotal_patent AgriculturalRiskAffected $xp $xr i.year, cluster(provinceid) r
reg lutility AgriculturalRiskCovered $xp $xr i.year, cluster(provinceid) r
reg lutility AgriculturalRiskAffected $xp $xr i.year, cluster(provinceid) r
reg ldesign AgriculturalRiskCovered $xp $xr i.year, cluster(provinceid) r
reg ldesign AgriculturalRiskAffected $xp $xr i.year, cluster(provinceid) r


//Supplementary Table 22 
reg divorce2 AgriculturalRiskCovered $xd $xr i.year, cluster(provinceid) r
reg divorce2 AgriculturalRiskAffected $xd $xr i.year, cluster(provinceid) r

